/**
 * 认证路由
 * @module routes/auth
 */

const express = require('express');
const router = express.Router();
const authController = require('../controllers/auth.controller');
const validation = require('../middlewares/validation.middleware');

// 注册新用户
router.post('/register', validation.validateRegister, authController.register);

// 用户登录
router.post('/login', validation.validateLogin, authController.login);

// 刷新访问令牌
router.post('/refresh', validation.validateRefreshToken, authController.refreshToken);

module.exports = router; 